package com.tpod.taxi.entity;

import org.json.JSONException;
import org.json.JSONObject;

import kds.business.BusinessObject;

public class Taxi extends BusinessObject {

	private String name;
	private String phone;
	private String logoUrl;
	private boolean fourSeater;
	private boolean sevenSeater;

	@Override
	public Taxi valueOfJSON(JSONObject arg0) throws JSONException {
		this.setName(arg0.getString("name"));
		this.setPhone(arg0.getString("phone"));
		this.setLogoUrl(arg0.getString("logo").length() == 0 ? null : arg0
				.getString("logo"));
		this.setFourSeater(arg0.getBoolean("4_seat"));
		this.setSevenSeater(arg0.getBoolean("7_seat"));
		return this;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getLogoUrl() {
		return logoUrl;
	}

	public void setLogoUrl(String logoUrl) {
		this.logoUrl = logoUrl;
	}

	

	public boolean haveSevenSeater() {
		return sevenSeater;
	}

	public void setSevenSeater(boolean sevenSeater) {
		this.sevenSeater = sevenSeater;
	}

	public boolean haveFourSeater() {
		return fourSeater;
	}

	public void setFourSeater(boolean fourSeater) {
		this.fourSeater = fourSeater;
	}

}
